.class public Lcom/adview/adapters/AdwoAdapter;
.super Lcom/adview/adapters/AdViewAdapter;
.source "AdwoAdapter.java"

# interfaces
.implements Lcom/adwo/adsdk/AdListener;


# direct methods
.method public constructor <init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V
    .locals 0
    .parameter "adViewLayout"
    .parameter "ration"

    .prologue
    .line 20
    invoke-direct {p0, p1, p2}, Lcom/adview/adapters/AdViewAdapter;-><init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V

    .line 22
    return-void
.end method


# virtual methods
.method public handle()V
    .locals 8

    .prologue
    const/4 v7, 0x0

    .line 28
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v4

    sget-object v5, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v4, v5, :cond_0

    .line 29
    const-string v4, "AdView SDK v1.7.0"

    const-string v5, "Into Adwo"

    invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 30
    :cond_0
    iget-object v4, p0, Lcom/adview/adapters/AdwoAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v4}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/adview/AdViewLayout;

    .line 31
    .local v2, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v2, :cond_2

    .line 56
    :cond_1
    :goto_0
    return-void

    .line 35
    :cond_2
    iget-object v4, v2, Lcom/adview/AdViewLayout;->activityReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v4}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    .line 36
    .local v0, activity:Landroid/app/Activity;
    if-eqz v0, :cond_1

    .line 39
    iget-object v3, v2, Lcom/adview/AdViewLayout;->extra:Lcom/adview/obj/Extra;

    .line 40
    .local v3, extra:Lcom/adview/obj/Extra;
    const/4 v1, 0x0

    .line 41
    .local v1, adView:Lcom/adwo/adsdk/AdwoAdView;
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v4

    sget-object v5, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v4, v5, :cond_3

    .line 42
    new-instance v1, Lcom/adwo/adsdk/AdwoAdView;

    .end local v1           #adView:Lcom/adwo/adsdk/AdwoAdView;
    invoke-virtual {v2}, Lcom/adview/AdViewLayout;->getContext()Landroid/content/Context;

    move-result-object v4

    check-cast v4, Landroid/app/Activity;

    iget-object v5, p0, Lcom/adview/adapters/AdwoAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v5, v5, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    const/4 v6, 0x1

    iget v7, v3, Lcom/adview/obj/Extra;->cycleTime:I

    invoke-direct {v1, v4, v5, v6, v7}, Lcom/adwo/adsdk/AdwoAdView;-><init>(Landroid/content/Context;Ljava/lang/String;ZI)V

    .line 49
    .restart local v1       #adView:Lcom/adwo/adsdk/AdwoAdView;
    :goto_1
    invoke-virtual {v1, p0}, Lcom/adwo/adsdk/AdwoAdView;->setListener(Lcom/adwo/adsdk/AdListener;)V

    .line 52
    iget-object v4, v2, Lcom/adview/AdViewLayout;->handler:Landroid/os/Handler;

    new-instance v5, Lcom/adview/AdViewLayout$ViewAdRunnable;

    invoke-direct {v5, v2, v1}, Lcom/adview/AdViewLayout$ViewAdRunnable;-><init>(Lcom/adview/AdViewLayout;Landroid/view/ViewGroup;)V

    invoke-virtual {v4, v5}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0

    .line 43
    :cond_3
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v4

    sget-object v5, Lcom/adview/AdViewTargeting$RunMode;->NORMAL:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v4, v5, :cond_4

    .line 44
    new-instance v1, Lcom/adwo/adsdk/AdwoAdView;

    .end local v1           #adView:Lcom/adwo/adsdk/AdwoAdView;
    invoke-virtual {v2}, Lcom/adview/AdViewLayout;->getContext()Landroid/content/Context;

    move-result-object v4

    check-cast v4, Landroid/app/Activity;

    iget-object v5, p0, Lcom/adview/adapters/AdwoAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v5, v5, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    iget v6, v3, Lcom/adview/obj/Extra;->cycleTime:I

    invoke-direct {v1, v4, v5, v7, v6}, Lcom/adwo/adsdk/AdwoAdView;-><init>(Landroid/content/Context;Ljava/lang/String;ZI)V

    .restart local v1       #adView:Lcom/adwo/adsdk/AdwoAdView;
    goto :goto_1

    .line 46
    :cond_4
    new-instance v1, Lcom/adwo/adsdk/AdwoAdView;

    .end local v1           #adView:Lcom/adwo/adsdk/AdwoAdView;
    invoke-virtual {v2}, Lcom/adview/AdViewLayout;->getContext()Landroid/content/Context;

    move-result-object v4

    check-cast v4, Landroid/app/Activity;

    iget-object v5, p0, Lcom/adview/adapters/AdwoAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v5, v5, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    iget v6, v3, Lcom/adview/obj/Extra;->cycleTime:I

    invoke-direct {v1, v4, v5, v7, v6}, Lcom/adwo/adsdk/AdwoAdView;-><init>(Landroid/content/Context;Ljava/lang/String;ZI)V

    .restart local v1       #adView:Lcom/adwo/adsdk/AdwoAdView;
    goto :goto_1
.end method

.method public onFailedToReceiveAd(Lcom/adwo/adsdk/AdwoAdView;)V
    .locals 3
    .parameter "adView"

    .prologue
    .line 61
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 62
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "onFailedToReceiveAd"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 64
    :cond_0
    const/4 v1, 0x0

    invoke-virtual {p1, v1}, Lcom/adwo/adsdk/AdwoAdView;->setListener(Lcom/adwo/adsdk/AdListener;)V

    .line 67
    iget-object v1, p0, Lcom/adview/adapters/AdwoAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 68
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 73
    :goto_0
    return-void

    .line 71
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover_pri()V

    .line 72
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedPri()V

    goto :goto_0
.end method

.method public onFailedToReceiveAd(Lcom/adwo/adsdk/AdwoAdView;Lcom/adwo/adsdk/ErrorCode;)V
    .locals 4
    .parameter "adView"
    .parameter "arg1"

    .prologue
    .line 78
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 79
    const-string v1, "AdView SDK v1.7.0"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "onFailedToReceiveAd, arg1="

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 81
    :cond_0
    const/4 v1, 0x0

    invoke-virtual {p1, v1}, Lcom/adwo/adsdk/AdwoAdView;->setListener(Lcom/adwo/adsdk/AdListener;)V

    .line 84
    iget-object v1, p0, Lcom/adview/adapters/AdwoAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 85
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 90
    :goto_0
    return-void

    .line 88
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover_pri()V

    .line 89
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedPri()V

    goto :goto_0
.end method

.method public onFailedToReceiveRefreshedAd(Lcom/adwo/adsdk/AdwoAdView;)V
    .locals 2
    .parameter "paramAdView"

    .prologue
    .line 95
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 96
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "onFailedToReceiveRefreshedAd"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 97
    :cond_0
    return-void
.end method

.method public onReceiveAd(Lcom/adwo/adsdk/AdwoAdView;)V
    .locals 3
    .parameter "adView"

    .prologue
    .line 102
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 103
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "onReceiveAd"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 105
    :cond_0
    const/4 v1, 0x0

    invoke-virtual {p1, v1}, Lcom/adwo/adsdk/AdwoAdView;->setListener(Lcom/adwo/adsdk/AdListener;)V

    .line 108
    iget-object v1, p0, Lcom/adview/adapters/AdwoAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 109
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 116
    :goto_0
    return-void

    .line 113
    :cond_1
    iget-object v1, v0, Lcom/adview/AdViewLayout;->adViewManager:Lcom/adview/AdViewManager;

    invoke-virtual {v1}, Lcom/adview/AdViewManager;->resetRollover()V

    .line 115
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->rotateThreadedDelayed()V

    goto :goto_0
.end method
